import java.util.concurrent.atomic.AtomicReferenceArray;

public class AtomicReferenceArrayDemo {
    public static void main(String[] args) {
        AtomicReferenceArray<String> array = new AtomicReferenceArray<>(new String[]{"Hello", "World"});
        array.set(1, "Java");//将索引为1的元素改为Java
        System.out.println(array.get(1));
    }
}
